<form action="{:request()->url()}" autocomplete="off" class="layui-form layui-card" data-auto="true" method="post">
    <div class="layui-card-body padding-left-40">
        <script>
            layui.form.render();
        </script>
        <label class="layui-form-item relative block">
            <span class="color-green font-w7">问题</span>
            <span class="color-desc margin-left-5">name</span>
            <input class="layui-input" name="name" placeholder="{$vo.name|default='项目名称'}"
                   value="{$vo.name|default=''}"/>
            <span class="help-block">请填写问题，建议字符不要太长，一般4个汉字</span>
        </label>
        <div class="layui-form-item relative block">
            <span class="color-green font-w7">类型</span>
            <span class="color-desc margin-left-5">Type</span>
            <select class="layui-select" lay-search name="type">
                <option value="">--- 类型 ---</option>
                {foreach ["自定义", "单选", "多选", "文本"] as $k => $t}
                {eq name='$vo.type|default="0"' value='$k'}
                <option selected value="{$k}">{$t|default=''}</option>
                {else}
                <option value="{$k}">{$t|default=''}</option>
                {/eq}
                {/foreach}
            </select>
        </div>
        <label class="layui-form-item relative block">
            <span class="color-green font-w7">选项说明</span>
            <span class="color-desc margin-left-5">Memo</span>
            <textarea placeholder="请输项目说明" class="layui-textarea" name="description">{$vo.description|default=""}</textarea>
            <span class="help-block"><b>必填，</b>请输选项说明</span>
        </label>
    </div>

    <div class="hr-line-dashed"></div>
    {notempty name='vo.id'}<input name='id' type='hidden' value='{$vo.id}'>{/notempty}
    <input name='qid' type='hidden' value='{$qid}'>
    <div class="layui-form-item text-center">
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" data-close data-confirm="确定要取消编辑吗？" type='button'>取消编辑</button>
    </div>
</form>